<!DOCTYPE html>
<html lang="zh">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
	<meta name="author" content="小枫">
	<title>赞助配置 | <%= data.title %></title>
	<link rel="shortcut icon" type="image/x-icon" href="<%= data.icon %>">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-touch-fullscreen" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="default">
	<link rel="stylesheet" type="text/css" href="/admin/css/materialdesignicons.min.css">
	<link rel="stylesheet" type="text/css" href="/admin/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="/admin/css/animate.min.css">
	<!--对话框插件css-->
	<link rel="stylesheet" type="text/css" href="/admin/js/jquery-confirm/jquery-confirm.min.css">
	<link rel="stylesheet" type="text/css" href="/admin/css/style.min.css">
	<link rel="stylesheet" type="text/css" href="/admin/css/upload.css">
</head>

<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-6">
				<div class="card">
					<header class="card-header">
						<div class="card-title">支付配置</div>
					</header>
					<div class="card-body">
						<form class="config-form" id="configForm">
							<div class="tab-content">
								<div class="mb-3">
									<label class="paymentOptions">选择支付【目前只有易支付有效, 其他支付将在下个版本更新】</label>
									<select class="form-control selectpicker" name="paymentOptions" id="paymentOptions">
										<option value="easyPay" id="easyPay">易支付</option>
										<!-- 下面的支付模块未对接赞助模块, 请勿开启!!! -->
										<!-- <option value="Alipay" id="Alipay">支付宝当面付</option> -->
										<!-- <option value="wxpay" id="wxpay">微信支付</option> -->
									</select>
									<small class="form-text fw-bolder">
										推荐使用: <span id="paymentRecommendation"></span>
									</small>
								</div>
								<div class="mb-3">
									<label for="shoppingName" class="form-label">商品名称</label>
									<input class="form-control" type="text" id="shoppingName" name="shoppingName" placeholder="请输入商品名称">
								</div>
								<div class="accordion">
									<div class="col-lg-12 mb-3 accordion-item">
										<h2 class="accordion-header" id="panelsStayOpen-headingOne">
											<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseOne" aria-expanded="true" aria-controls="panelsStayOpen-collapseOne">
												易支付配置
											</button>
										</h2>
										<div id="panelsStayOpen-collapseOne" class="accordion-collapse collapse show" aria-labelledby="panelsStayOpen-headingOne">
											<div class="accordion-body">
												<div class="mb-3">
													<label for="easyPayUrl" class="form-label">接口地址</label>
													<input class="form-control" type="text" id="easyPayUrl" name="easyPayUrl" placeholder="请输入接口地址">
												</div>
												<div class="mb-3">
													<label for="easyPayid" class="form-label">商户ID（PID）</label>
													<input class="form-control" type="text" id="easyPayid" name="easyPayid" placeholder="请输入商户ID">
												</div>
												<div class="mb-3">
													<label for="easyPaykey" class="form-label">商户密钥（KEY）</label>
													<input class="form-control" type="text" id="easyPaykey" name="easyPaykey" placeholder="请输入商户密钥">
												</div>
											</div>
										</div>
									</div>
									<div class="col-lg-12 mb-3 accordion-item" style="border-top: 1px solid var(--bs-border-color);">
										<h2 class="accordion-header" id="panelsStayOpen-headingTwo">
											<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseTwo" aria-expanded="false" aria-controls="panelsStayOpen-collapseTwo">
												支付宝当面付【暂不可用】
											</button>
										</h2>
										<div id="panelsStayOpen-collapseTwo" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingTwo">
											<div class="accordion-body">
												<div class="mb-3">
													<label for="appId" class="form-label">支付宝应用（appid）</label>
													<input class="form-control" type="number" id="appId" name="appId" placeholder="请输入支付宝应用appid" readonly disabled>
												</div>
												<div class="mb-3">
													<label for="privateKey" class="form-label">支付宝私钥（privateKey）</label>
													<textarea class="form-control" id="privateKey" rows="5" name="privateKey" placeholder="请输入支付宝私钥" readonly disabled></textarea>
												</div>
												<div class="mb-3">
													<label for="alipayPublicKey" class="form-label">支付宝公钥（publicKey）</label>
													<textarea class="form-control" id="alipayPublicKey" rows="5" name="alipayPublicKey" placeholder="请输入支付宝公钥" readonly disabled></textarea>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="mb-3">
								<button type="button" class="btn btn-primary me-1" onclick="savePayData()">保 存</button>
							</div>
						</form>
					</div>
				</div>
			</div>
			<div class="col-lg-6">
				<div class="card">
					<header class="card-header">
						<div class="card-title">赞助模块编辑</div>
					</header>
					<div class="card-body">
						<form class="config-form" id="sponsorInfoForm">
							<div class="tab-content">
								<div class="mb-3">
									<label for="sponsor_home_icon" class="form-label">首页赞助模块图标</label>
									<div class="input-group">
										<input autofocus="" type="text" id="sponsor_home_icon" name="sponsor_home_icon" placeholder="请输入首页赞助模块图标链接" class="form-control">
										<button class="btn btn-default uploadBtn" type="button"><span>上传图片</span><input type="file" accept="image/*" class="fileInput" onchange="handleFileSelect(event)"></button>
									</div>
								</div>
								<div class="mb-3">
									<label for="sponsor_title" class="form-label">首页赞助模块标题</label>
									<div class="input-group">
										<input class="form-control" type="text" id="sponsor_title" name="sponsor_title" placeholder="请输入首页赞助模块标题">
									</div>
								</div>
								<div class="mb-3">
									<label for="sponsor_desc" class="form-label">首页赞助模块介绍</label>
									<div class="input-group">
										<textarea class="form-control" id="sponsor_desc" rows="5" name="sponsor_desc" placeholder="请输入首页赞助模块介绍"></textarea>
									</div>
								</div>
								<div class="mb-3">
									<label for="sponsor_btn_text" class="form-label">首页赞助模块按钮文字</label>
									<div class="input-group">
										<input class="form-control" type="text" id="sponsor_btn_text" name="sponsor_btn_text" placeholder="请输入首页赞助模块按钮文字">
									</div>
								</div>
								<div class="mb-3">
									<label for="sponsor_list_icon" class="form-label">赞助页列表图标</label>
									<div class="input-group">
										<input autofocus="" type="text" id="sponsor_list_icon" name="sponsor_list_icon" placeholder="请输入赞助页列表图标" class="form-control">
										<button class="btn btn-default uploadBtn" type="button"><span>上传图片</span><input type="file" accept="image/*" class="fileInput" onchange="handleFileSelect(event)"></button>
									</div>
								</div>
								<div class="mb-3">
									<label for="sponsor_list_title" class="form-label">赞助页列表标题</label>
									<div class="input-group">
										<input class="form-control" type="text" id="sponsor_list_title" name="sponsor_list_title" placeholder="请输入赞助页列表标题">
									</div>
								</div>
							</div>
							<div class="mb-3">
								<button type="button" class="btn btn-primary me-1" onclick="saveSponsorData()">保 存</button>
							</div>
						</form>
					</div>
				</div>
			</div>
			<div class="col-lg-12">
				<div class="card">
					<header class="card-header">
						<div class="card-title">赞助列表 (如果你开启了赞助模块建议配置好行为验证模块，防止被刷)</div>
					</header>
					<div class="card-body">
						<div class="row">
							<div class="card-btns mb-2-5 col-lg-7 flex-row">
								<a class="btn btn-primary me-1 mb-3" href="JavaScript:;" onclick="add()"><i class="mdi mdi-plus"></i> 新增赞助</a>
								<a class="btn btn-teal me-1 mb-3" href="JavaScript:;" onclick="renderingSponsorData()"><i class="mdi mdi-all-inclusive"></i> 所有赞助</a>
								<a class="btn btn-success me-1 mb-3" href="JavaScript:;" onclick="querySponsor()"><i class="mdi mdi-magnify"></i> 查询赞助</a>
								<a class="btn btn-success me-1 mb-3" href="JavaScript:;" onclick="queryPayStatus('1')"><i class="mdi mdi-magnify"></i> 查询已支付订单</a>
								<a class="btn btn-success me-1 mb-3" href="JavaScript:;" onclick="queryPayStatus('0')"><i class="mdi mdi-magnify"></i> 查询未支付订单</a>
							</div>
							<div class="card-btns mb-2-5 col-lg-5 flex-row flex-row-reverse">
								<a class="btn btn-outline-danger me-1 mb-3" href="JavaScript:;" onclick="delTr('payStatus', '1')"><i class="mdi mdi-trash-can"></i> 删除已支付订单</a>
								<a class="btn btn-outline-danger me-1 mb-3" href="JavaScript:;" onclick="delTr('payStatus', '0')"><i class="mdi mdi-trash-can"></i> 删除未支付订单</a>
								<a class="btn btn-outline-danger me-1 mb-3" href="JavaScript:;" onclick="delTr('all', '1')"><i class="mdi mdi-trash-can"></i> 删除全部订单</a>
							</div>
						</div>
						<div class="table-responsive" id="loading-dom">
							<div id="loading-dom"></div>
							<table class="table table-bordered">
								<thead>
									<tr class="text-center">
										<th>编号</th>
										<th>头像</th>
										<th>名称</th>
										<th>QQ</th>
										<th>赞助金额</th>
										<th>付款状态</th>
										<th>提交时间</th>
										<th>订单号</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="sponsorData"></tbody>
							</table>
						</div>
						<ul class="pagination text-center" id="paginationDom"></ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="/admin/js/jquery.min.js"></script>
	<script type="text/javascript" src="/admin/js/popper.min.js"></script>
	<script type="text/javascript" src="/admin/js/bootstrap.min.js"></script>
	<!-- 引入dayjs -->
	<script type="text/javascript" src="/admin/js/dayjs/dayjs.min.js"></script>
	<script type="text/javascript" src="/admin/js/dayjs/utc.js"></script>
	<script type="text/javascript" src="/admin/js/dayjs/timezone.js"></script>
	<!--引入notify插件js-->
	<script type="text/javascript" src="/admin/js/bootstrap-notify.min.js"></script>
	<!-- 懒加载插件 -->
	<script type="text/javascript" src="/admin/js/lazyload.min.js"></script>
	<!--对话框插件js-->
	<script type="text/javascript" src="/admin/js/jquery-confirm/jquery-confirm.min.js"></script>
	<!--引入loading插件js-->
	<script type="text/javascript" src="/admin/js/lyear-loading.js"></script>
	<script type="text/javascript" src="/admin/js/upload.js"></script>
	<script type="text/javascript" src="/admin/js/sweetalert.min.js"></script>
	<script type="text/javascript" src="/admin/js/main.min.js"></script>
	<script type="text/javascript" src="/admin/js/nitai5pro/sponsor.js"></script>
</body>

</html>